<script setup>
    import { ref } from 'vue';
    let flag = ref(true)
</script>

<template>
    <div>
        <h1 v-if="flag">hahahaha</h1>
        <h1 v-else>heiheihei</h1>
        <h1 v-show="flag">fafs</h1>
        <button @click="flag = !flag">切换</button>

    </div>
</template>
  

<style scoped>

</style>
